package com.kakavr.pay.util;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.kakavr.pay.constant.ALiPayConstant;

/**
 * 支付宝支付公共类
 * @author gang.yang
 *
 */
public class AlipayUtil {
	
	/**
	 * 获得初始化的AlipayClient
	 * @return
	 */
	public static AlipayClient getAlipayClient(){
		return new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",
				ALiPayConstant.getAlipayPid(),
				ALiPayConstant.getAliAppPrivateKey(),
				ALiPayConstant.ALIPAY_FORMATE,
				ALiPayConstant.ALI_INPUT_CHARSET,
				ALiPayConstant.getAliAppPublicKey(), ALiPayConstant.RSA2); 
	}

}
